package com.xieyong.leetcode;

public class Leetcode3304 {
    public static void main(String[] args) {
        Leetcode3304 leetcode3304 = new Leetcode3304();
        int k = 0;
        char c = leetcode3304.kthCharacter(k);
        System.out.println(c);

    }
    public char kthCharacter(int k) {
        StringBuilder sb = new StringBuilder();
        sb.append('a');
        while(sb.length() < k) {
            StringBuilder newstr = new StringBuilder();
            for(int i = 0; i < sb.length(); i++) {
                newstr.append((char) (sb.charAt(i) + 1));

            }
            sb.append(newstr);
        }
        return sb.charAt(k - 1);
    }
}
